<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Bootstrap 模板</title>
		<meta name="viewport" content="width=device-width,initial-scale=1.0" />
		<!--
        	作者：offline
        	时间：2017-03-19
        	描述：引入Bootstrap
        -->
        <link href="css/bootstrap.min.css" rel="stylesheet"/>
        
	</head>
	<body>
		<!--<h1>Hello,world!</h1>-->
		<form>
		   <input type="text" name="title" />
		   <input type="file" name="file" /> 
		   <textarea rows="20" cols="100" name="content"></textarea>
		</form>
		<button>提交</button>
		<!--<script src="js/bootstrap.min.js" type="text/javascript"></script>-->
        <script src="js/jquery-3.1.1.min.js" type="text/javascript"></script>
		<script>
			window.onload=function(){
				$("button").click(function(){
					var formData=new FormData();
					$.ajax({
						type:"post",
						url:"TestServlet",
						async:true,
						data:new FormData($("form")[0]),
						enctype:"multipart/form-data",
						processData:false,
						contentType:false,
						success:function(data){
							alert(data);
						}
					});
				})
			}
		</script>
	</body>
</html>
